<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>类型首页_苏宁易购</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" href="http://localhost/program/template/css/type.css" />
	<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

<link rel="stylesheet" href="http://localhost/program/template/css/css.css" />
<script type="text/javascript" src="http://localhost/program/template/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://localhost/program/template/js/index.js"></script>
</head>

<body>
	<!-- 顶部灰色条开始 -->
	<div id="top_box">
		<div class="top">
			<ul class="top_l">
				<li class="tel">
					<span class="tel_ico"></span>
					<span class="sanjiao"></span>
					<a href="#">手机苏宁</a> 	
				</li>
<!-- 隐藏区域 --> <div class="erwei">
					<p><a href="#">扫描二维码,下载苏宁客户端</a></p>
					<div class="saoma">
						<a href="#" class="e1"><img src="http://localhost/program/template/images/erm.png" alt="" /></a>
						<a href="#" class="e2"><b></b>Android</a>
						<a href="#" class="e2 e3"><b></b>iPhone</b></a>
						<a href="#" class="e2 e4"><b></b>iPad</b></a>
						<a href="#" class="e5"><img src="http://localhost/program/template/images/erm2.png" alt="" /></a>
					</div>
				  </div>


				
				    <?php if(isset($_SESSION['user'])){ ?>
					<li><a href="">你好，<?php echo $hd['session']['user'];?></a></li>
					<li><a href="<?php echo U('Member/out');?>">退出登陆</a></li>
				<?php }else{ ?>
				<li class="welcome">你好，欢迎来苏宁易购！</li>
				<li><a href="<?php echo U('Member/login');?>">请登录</a></li>
				<li><a href="<?php echo U('Member/regist');?>">免费注册</a></li>
				<?php } ?>
			</ul>
			<ul class="top_r">
				<li><a href="#">我的订单</a></li>
				<li class="wo_yigou">
					<span class="sanjiao"></span>
					<a href="#" class="us">我的易购</a>
					<ul>
						<li><span class="sanjiao3"></span><a href="#">我的易购</a></li>
						<li><a href="#">收藏夹</a></li>
						<li><a href="#">我的优惠券</a></li>
						<li><a href="#">我的云钻</a></li>
						<li><a href="#">待评价</a></li>
					</ul>
				</li>
				<li class="huiyuan"><span class="vip"></span><a href="#">会员联盟</a></li>
				<li class="wo_yigou">
					<span class="sanjiao"></span>
					服务中心
					<ul style="height:161px;">
						<li><span class="sanjiao3"></span>服务中心</li>
						<li><a href="#">查找门店</a></li>
						<li><a href="#">在线客服</a></li>
						<li><a href="#">退换货</a></li>
						<li><a href="#">投诉</a></li>
						<li><a href="#">维修保养</a></li>
						<li><a href="#">帮助中心</a></li>
					</ul>
				</li>
				<li><a href="#">易付宝</a></li>
				<li class="wo_yigou dao">
					<span class="sanjiao"></span>网站导航	
				</li>
				<div class="web_nav">
					<h3>
						<a href="#">母婴</a>
						<a href="#">美妆</a>
						<a href="#">团购</a>
						<a href="#">零钱宝</a>
						<a href="#" class="hulian">苏宁互联</a>
					</h3>
					<dl>
						<dt>购物</dt>
						<dd><a href="#">服饰</a></dd>
						<dd><a href="#">图书</a></dd>
						<dd><a href="#">办公直通车</a></dd>
						<dd><a href="#">视频购物</a></dd>
						<dd><a href="#">品牌街</a></dd>
						<dd><a href="#">礼品卡</a></dd>
						<dd><a href="#">电子书</a></dd>
						<dd><a href="#">运动馆</a></dd>
						<dd><a href="#">0元试用</a></dd>
					</dl>
					<dl class="dl2">
						<dt>生活</dt>
						<dd><a href="#">商旅</a></dd>
						<dd><a href="#">保险</a></dd>
						<dd><a href="#">彩票</a></dd>
						<dd><a href="#">水电煤</a></dd>
						<dd><a href="#">游戏</a></dd>
						<dd><a href="#">PPTV下载</a></dd>
						
					</dl>
					<dl>
						<dt>服务</dt>
						<dd><a href="#">应用商店</a></dd>
						<dd><a href="#">苏宁云</a></dd>
						<dd><a href="#">社区</a></dd>
						<dd><a href="#">客户端</a></dd>
						<dd><a href="#">对公销售</a></dd>
						<dd><a href="#">会员联盟</a></dd>
						<dd><a href="#">商家入驻</a></dd>
						<dd><a href="#">苏宁帮客</a></dd>
						
					</dl>
					<dl class="dl4">
						<dd>服务热线:<span>4008-365-365</span></dd>
					</dl>
				</div>
			</ul>
		</div>
	</div>
	<!-- 顶部灰色条结束 -->

	<div id="top_ad">
		<img src="http://localhost/program/template/images/top_ad.jpg" alt="" />
		<span id="closed"></span>
	</div>
	<!-- 搜索行开始 -->
	<div id="search_box">
		<a href="<?php echo U('Index/index');?>"><img src="http://localhost/program/template/images/logo.png" alt="" class="logo" /></a>
		<img src="http://localhost/program/template/images/wan.gif" alt="" class="wan" />
		<form action="">
			<input type="text" value="健康油你 烹饪生活" class="search" onfocus="if(this.value=='健康油你 烹饪生活'){this.value='';}"  onblur="if(this.value==''){this.value='健康油你 烹饪生活';}"/>
			<input type="submit" value="" class="tijiao"/>
		</form>
		<p class="key_words">
			<a href="#">iPad Air2</a>
			<a href="#">短靴</a>
			<a href="#">微波炉</a>
			<a href="#">PPBOX</a>
			<a href="#">客厅灯</a>
			<a href="#">空调反季降价了</a>
		</p>
		<div class="cart">
			<b>0</b>
			<em></em>	
			<div class="shop_box">
				<div class="shop_list">
					<span></span>
					<p>
						您的购物车是空的<br/>
						如您已添加过商品，可<a href="#">登录</a>后查看
					</p>
				</div>
			</div>
			<a  class="shop_cart">购物车</a>
		</div>
	</div>
	<!-- 搜索行结束 -->
	<!-- 导航条开始 -->
	<ul id="nav_box">
		<li class="all"><span></span><a href="#">全部商品分类</a></li>
		<li class="sy"><a href="http://localhost/program">首页</a></li>
		<?php
    $data=K('Type')->get_all_data();
    // p($data);
    foreach ($data as $field):
    $field['turl']=U('Type/index',array('tid'=>$field['type_id']));
?>
    
			<li><span></span><a href="<?php echo $field['turl'];?>"><?php echo $field['type_name'];?></a></li>
		
<?php endforeach ?>

	</ul>
	<!-- 导航条结束 -->
	<!-- 导航条结束 -->
	<!-- 类目行开始 -->
	<div id="leimu_box" class="leit" style="height:560px">
		<div class="tl_box">
			<h2>服饰频道</h2>
			<ul class="leimu_lt">
				<h3>畅销品类</h3>
				<?php foreach ($dataTop as $k=>$v){?>
				<li><a href="<?php echo U('Category/index',array('cid'=>$v['cid'],'tid'=>$v['type_id']));?>"><?php echo $v['cname'];?></a></li>
				<?php }?>
				
			</ul>
			<ul class="leimu_lt">
				<h3>热门关注</h3>
				<?php foreach ($dataHot as $k=>$v){?>
					<li><a href="<?php echo U('Category/index',array('cid'=>$v['cid'],'tid'=>$v['type_id']));?>"><?php echo $v['cname'];?></a></li>
				<?php }?>
			</ul>
			
		</div>
		
		
		<!-- 类目行中开始 -->
		<div  class="hd" style="height:330px;border:0">
			<div class="ad1">
				        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($ad)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($ad as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=6)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($ad)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
					    <?php if($hd['list']['v']['first']){ ?>
					<a href="<?php echo $v['url'];?>" class="img" style="display:block"><img src="http://localhost/program/<?php echo $v['pic'];?>" alt="" /></a>
					<?php }else{ ?>
					<a href="<?php echo $v['url'];?>" class="img" style="display:none"><img src="http://localhost/program/<?php echo $v['pic'];?>" alt="" /></a>
					<?php } ?>
				<?php }}?>
				<p class="ul_box"></p>
				<ul class="hd_yuan">
					<li class="xu" style="background:#ff7900"></li>
					<li class="xu"></li>
					<li class="xu"></li>
					<li class="xu"></li>
					<li class="xu"></li>
					<li class="more_ad"></li>
				</ul>
				<span class="ad_l"><b></b></span>
				<span class="ad_r"><b></b></span>
			</div>

		</div>
		
		<ul id="l_xia">
			        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($productfive)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($productfive as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=5)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($productfive)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
				<li>
					<a target="_blank" href="<?php echo U('Product/index',array('pr_id'=>$v['pr_id'],'cid'=>$v['category_cid']));?>"><img src="http://localhost/program/<?php echo $v['list_pic'];?>" alt="" /></a>
				</li>			
			<?php }}?>
		</ul>
		
			
	
		<!-- 类目行中结束 -->
		<!-- 类目行右侧开始 -->
		<div class="leimu_you" style="height:560px">
			<h3>热销排行榜</h3>
			<div class="cuxiao">
				<p>
					<?php foreach ($dataHotTwo as $k=>$v){?>
					<a href="<?php echo U('Category/index',array('cid'=>$v['cid'],'tid'=>$v['type_id']));?>"><?php echo $v['cname'];?></a>
					<?php }?>
				</p>
				<?php foreach ($dataHotFive as $k=>$v){?>

					
					<ul class="tcu" style="height:560px">
						<?php foreach ($v['pro'] as $m=>$n){?>
						<li style="width: 260px;height: 120px;">
							<p style="width:260px;"><i><?php echo $m+1 ?></i><?php echo $n['pr_name'];?></p>
							<img src="http://localhost/program/<?php echo $n['list_pic'];?>" alt="" width="64" height="64"/>
							<a href="<?php echo U('Product/index',array('pr_id'=>$n['pr_id'],'cid'=>$n['category_cid']));?>" ><?php echo $n['pr_name'];?></a>
							<b>￥<?php echo $n['market_price'];?></b>
						</li>
						<?php }?>
					</ul>
					

				<?php }?>
			</div>
			
		</div>
	</div>
	<!-- 类目行结束 -->

	<!-- 1floor开始 -->
	        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($dataHotTwo)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($dataHotTwo as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=2)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($dataHotTwo)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
	<div class="floor" id="1F">
		<div class="bt" style="border-bottom:7px solid #e1e1e1;margin-bottom:10px">
			<span class="type_icon"></span>
			<h3><b></b><?php echo $v['cname'];?></h3>
			
			<p>
				<?php foreach ($v['son'] as $key=>$value){?>
				<a href="<?php echo U('Category/index',array('cid'=>$value['cid'],'tid'=>$value['type_id']));?>"><?php echo $value['cname'];?></a>
				<?php }?>
			</p>
		</div>

		<div class="floor_l">
			<div style="height:400;">
				
				<img src="http://localhost/program/<?php echo $v['cpic'];?>" alt="" style="height:500px;width:180px; margin-left:5px"/>

			</div>

		</div>
	
	
	<div class="floor_r_box">
				
		<div class="floor_r floor2_r ">
		
				<ul class="floor2_mr" style="width:1000px;">
					<?php foreach ($v['pro'] as $m=>$n){?>
						<li style="border:0">
							<a href="<?php echo U('Product/index',array('pr_id'=>$n['pr_id'],'cid'=>$n['category_cid']));?>" class="floor2_pic"><img width="160" height="160" style="position: relative; top:-10px;left:-25px" src="http://localhost/program/<?php echo $n['list_pic'];?>" alt="" /></a>
							<p style="height:36px:"><a href="<?php echo U('Product/index',array('pr_id'=>$n['pr_id'],'cid'=>$n['category_cid']));?>"><?php echo $n['pr_name'];?></a></p>
							<span><em>¥</em><?php echo $n['market_price'];?></span>
						</li>
					<?php }?>
				</ul>
				
				
				
				</div></div>
		</div>


		
	</div>
	

	</div>
	<?php }}?>
	<!-- 产品1楼结束 -->
	<div id="type_tj">
		<h3>品牌推荐</h3>
		<ul>
			        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($allrand)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($allrand as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($allrand)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
			<li><a href=""><img src="http://localhost/program/<?php echo $v['pic'];?>" alt="" width="160" height="160"/></a></li>
			<?php }}?>
		</ul>
	</div>
	<!-- 品牌库 -->
	<div id="type_tj2">
		<h3>品牌库</h3>
		<ul>
			<?php foreach ($allrand as $k=>$v){?>
			<li>
				<a href="<?php echo U('Category/index',array('cid'=>$v['cid'],'tid'=>$_GET['tid']));?>"><img src="http://localhost/program/<?php echo $v['logo'];?>" alt="" width="160" height="160"/></a>
				<p>品牌名</p>
			</li>
			<?php }?>

		</ul>
	</div>
	<!-- 新手服务开始 -->
	<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

	<!-- 新手服务开始 -->
	<div id="help_box">
		<div class="help">
			<dl class="dl1">
				<dt>新手上路</dt>
				<dd><a href="#">购物指南</a></dd>
				<dd><a href="#">会员介绍</a></dd>
				<dd><a href="#">发票制度</a></dd>
				<dd><a href="#">常见问题</a></dd>
				<dd><a href="#">在线客服</a></dd>

			</dl>
			<dl class="dl2">
				<dt>支付方式</dt>
				<dd><a href="#">易付宝支付</a></dd>
				<dd><a href="#">网银支付</a></dd>
				<dd><a href="#">快捷支付</a></dd>
				<dd><a href="#">分期付款</a></dd>
				<dd><a href="#">货到付款</a></dd>
				<dd><a href="#">门店支付</a></dd>
			</dl>
			<dl class="dl3">
				<dt>物流配送</dt>
				<dd><a href="#">苏宁配送</a></dd>
				<dd><a href="#">门店自提</a></dd>
				<dd><a href="#">百城半日达</a></dd>
				<dd><a href="#">配送范围及时间</a></dd>
				<dd><a href="#">配送状态查询</a></dd>
			</dl>
			<dl class="dl4">
				<dt>售后服务</dt>
				<dd><a href="#">咨询与投诉</a></dd>
				<dd><a href="#">维修与保养</a></dd>
				<dd><a href="#">购买延保服务</a></dd>
				<dd><a href="#">退换货申请</a></dd>
				<dd><a href="#">退换货政策</a></dd>
			</dl>
			<dl class="dl5">
				<dt>商家服务</dt>
				<dd><a href="#">商家帮助</a></dd>
				<dd><a href="#">商家入驻</a></dd>
				<dd><a href="#">新手指导</a></dd>
				<dd><a href="#">培训中心</a></dd>
				<dd><a href="#">信息公告</a></dd>
				<dd><a href="#">广告服务</a></dd>
			</dl>
			<dl class="dl6">
				<dt>苏宁众包</dt>
				<dd>以苏宁全渠道包销为主要特点，整合全社会众包资源，扶持创新企业，推广创新产品。
				</dd>
				<a href="#" class="more">了解更多</a>
			</dl>
			<dl class="dl7">
				<dt>网络服务</dt>
				<dd>我们在全国300个城市有<a href="#">1600</a>
					家门店<a href="#">3000</a>个服务点为您提供最贴心的阳光服务！
				</dd>
				<dd class="fangda"></dd>
				<dd class="shenbian">搜索您身边的苏宁</dd>
			</dl>
		</div>
	</div>

	<!-- 新手服务结束 -->

	<!-- 服务ad开始 -->
	<div id="zheng">
		<p>
			<a href="#" class="a1"></a>
			<a href="#" class="a2"></a>
			<a href="#" class="a3"></a>
		</p>
	</div>
	<!-- 服务ad结束 -->

	<!-- foot开始 -->
	<div id="foot_box">
		<p class="f1">
			<a href="#">苏宁云商</a>
			<a href="#">苏宁易购</a>
			<a href="#">苏宁互联</a>
			<a href="#">红孩子</a>
			<a href="#">缤购</a>
			<a href="#">易付宝</a>
			<a href="#">PPTV</a>
			<a href="#">乐购仕</a>
		</p>
		<p class="f2">
			<a href="#">关于苏宁易购</a>
			<a href="#">联系我们</a>
			<a href="#">诚聘英才</a>
			<a href="#">云台商户入驻</a>
			<a href="#">苏宁众包</a>
			<a href="#">苏宁联盟</a>
			<a href="#">苏宁招标</a>
			<a href="#">友情链接</a>
			<a href="#">法律声明</a>
			<a href="#">用户体验提升计划</a>
		</p>
		<p class="f3">Copyright© 2002-2014 ，苏宁版权所有 苏ICP备10207551号 苏B2-20100316 出版物经营许可证新出发苏批字第A-243号</p>
		<p class="f4">
			<a href="#"><img src="http://localhost/program/template/images/foot_logo1.png" alt="" /></a>
			<a href="#"><img src="http://localhost/program/template/images/foot_logo2.png" alt="" /></a>
			<a href="#"><img src="http://localhost/program/template/images/foot_logo3.png" alt="" /></a>
		</p>
	</div>
	<!-- foot结束 -->


	<!-- 右边固定广告 -->
	<ul class="right_ad">
		<li class="custom">
			<a href="#"></a>
			<div class="erwei_ad">
				<a href="#" class="erwei_pic"><img src="http://localhost/program/template/images/erm.png" alt="" /></a>	
				<a href="#" class="sp">
					领免费碎屏险
				</a>
			</div>
		</li>
		<li class="am"><a href="#"></a></li>
		<li class="advice b_a"><a href="#">问卷调查</a></li>
		<li class="back_top b_a"><a href="#top">返回顶部</a></li>
		
	</ul>

	
</body>
</html>